
<!DOCTYPE html>
<html >
<head lang="en">

    <#include "../head_import.html" />

</head>
<body>
<#include "../include/top_nav.html">
    <div class="am-cf admin-main">

        <!-- sidebar start -->
        <#include "../left.html">
            <!-- sidebar end -->
            <!-- content start-->
            <div class="admin-content">
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><@s.m "global.position"/>: <@s.m "product.discuss"/> - <@s.m "global.list"/></div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form action="list.do">
                            <@s.m "discuss.people"/>： <input type="text" name="userName" value="${userName!}" style="width:100px"/>
                            <@s.m "discuss.product"/>： <input type="text" name="productName" value="${productName!}" style="width:100px"/>
                            <@s.m "discuss.date"/>：
                            <input type="text" name="startTime" value="${startTime!}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                            &nbsp;至&nbsp;<input type="text" name="endTime" value="${endTime!}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                            <input type="submit"  class="ropt" value="<@s.m "global.query"/>" />
                        </form>

                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form id="tableForm" method="post">
                            <input type="hidden" name="pageNo" value="${pageNo!}"/>
                            <@p.table listAction="list.do" value=pagination;discuss,i,has_next><#rt/>
                            <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
                            <input type='checkbox' name='ids' value='${discuss.id}'/><#t/>
                        </@p.column><#t/>
                        <@p.column title="ID">${discuss.id}</@p.column><#t/>
                    <@p.column code="discuss.date">${discuss.time}</@p.column><#t/>
                <@p.column code="discuss.product"><#if discuss.product??>${discuss.product.name!}</#if></@p.column><#t/>
            <@p.column code="discuss.people">${discuss.member.username}</@p.column><#t/>
        <@p.column code="global.operate" align="center">
        <a href="edit.do?id=${discuss.id}&pageNo=${pageNo!}"><@s.m "admin.view"/></a> | <#rt/>
        <a href="o_delete.do?ids=${discuss.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
    </@p.column><#t/>
</@p.table>
<div><input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
</form>

</div>
</div>


</div>

</div>
<#include "/common/alert_message.html"/>
</body>
<script type="text/javascript">
    function optDelete() {
        if(Pn.checkedCount('ids')<=0) {
            alert("<@s.m 'error.checkRecord'/>");
            return;
        }
        if(!confirm("<@s.m 'global.confirm.delete'/>")) {
            return;
        }
        var f = document.getElementById('tableForm');
        f.action="delete.do";
        f.submit();
    }
</script>
</html>